package com.sq.partner.manager.dao;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.sq.partner.manager.mybatis.model.GatewayRole;
import com.sq.partner.manager.mybatis.model.TradInsuPlan;
import com.sq.partner.manager.mybatis.model.TradPlanGroup;
import com.sq.partner.manager.util.Page;

/**
 * 组合方案配置
 * @author zhihuizhao
 *
 */
public interface ITradPlanGroupDao {

	/**
	 * 查询方案组ID
	 * @param planGroup
	 * @return
	 * @throws Exception
	 */
	TradPlanGroup queryTradPlanGroupID(TradPlanGroup group) throws Exception;
	
	
	/**
	 * 查询所有组合方案信息
	 * @param page
	 * @return
	 * @throws Exception
	 */
	Page<TradPlanGroup> queryPage(Page<TradPlanGroup> page) throws Exception;
	
	
	/**
	 * 新增”方案组“
	 * @param group
	 * @return
	 * @throws Exception
	 */
	boolean addTradPlanGroup(TradPlanGroup group) throws Exception;


	/**
	 * 编辑”方案组“
	 * @param group
	 * @return
	 * @throws Exception
	 */
	boolean editTradPlanGroup(TradPlanGroup group) throws Exception;
	
	/**
	 * 删除”方案组“，根据主键ID
	 * @param id
	 * @return
	 * @throws Exception
	 */
	boolean deleteTradPlanGroup(Long id) throws Exception;
	
	
	/**
	 * 查询方案组对应合作伙伴下所有投保方案信息
	 * @param page
	 * @param groupId
	 * @param partnerCode
	 * @return
	 * @throws Exception
	 */
	Page<TradInsuPlan> queryTradInsuPlanPage(Page<TradInsuPlan> page,Long groupId,String partnerCode) throws Exception;
	/**
	 * 根据id查询
	 * @param id
	 * @return
	 * @throws Exception
	 */
	List<TradPlanGroup> queryGroupByMap(Map<String, Object> map ) throws Exception;
	/**
	 * 组合险查询
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public Page<Map<String,Object>> queryGroupByPage(Page<Map<String,Object>> page) throws Exception;
	
	/**
	 * 组合险查询方案列表
	 */
	public Page<Map<String,Object>> queryGroupPlanByPage(Page<Map<String,Object>> page) throws Exception;
	
	List<Map<String, Object>> impGroupPlan(Map<String, Object> map)throws Exception;

}
